package com.svse.services.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.svse.annotation.DataSource;
import com.svse.dao.UserMapper;
import com.svse.entity.DemoEntity;
import com.svse.entity.UserEntity;
import com.svse.enums.DataSourceEnum;
import com.svse.services.UserService;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 李宇航
 * @since 2019-10-14
 */
@Service
public class UserImpl extends ServiceImpl<UserMapper, UserEntity> implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public List<UserEntity> pageList(RowBounds rowBounds) {
        return  userMapper.pageList(rowBounds);
    }

    @Override
    @DataSource(DataSourceEnum.SLAVE)
    public List<UserEntity> list() {
        return super.list();
    }

}
